package reduce.fz.com.reduce.activity;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;

import reduce.fz.com.reduce.R;
import reduce.fz.com.reduce.custom.TextViewItemActivity;

public class StoryPicTextEditActivity extends BaseToolBarActivity  {

    private EditText mEtComment;
    private TextView tvSave;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_story_pic_text_edit);
        setToolbarTitle("编辑内容");
        tvSave=setRightBtn("保存");
        initWidget();
    }


    @Override
    public void initWidget() {
        mEtComment = (EditText) findViewById(R.id.et_comment);
        initSaveBtnListener();
    }

    public void initSaveBtnListener() {
        tvSave.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent();
                intent.putExtra("pictext", mEtComment.getText().toString());
                setResult(RESULT_OK, intent);
                finish();
            }
        });
    }

    @Override
    public void initListener() {

    }


}
